package com.worldcup.dao.question;

import com.worldcup.model.question.QuestionUserAnswer;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface QuestionUserAnswerMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(QuestionUserAnswer record);

    int insertSelective(QuestionUserAnswer record);

    QuestionUserAnswer selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(QuestionUserAnswer record);

    int updateByPrimaryKey(QuestionUserAnswer record);

    /**
     * 获取某用户所有答案
     * @param openid
     * @return
     */
    List<QuestionUserAnswer> selectByOpenid(String openid);

    /**
     * 获取所有填写问卷的用户
     * @return
     */
    List<String> getAllUser();
}